test: update test implementation to work well with typescript 6#1436
Conversation
|
@launchdarkly/js-sdk-common size report |
|
@launchdarkly/js-client-sdk size report |
|
@launchdarkly/browser size report |
0f187c2 to
73ce3d2
Compare
|
@launchdarkly/js-client-sdk-common size report |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 73ce3d2. Configure here.
d2160b2 to
5010b22
Compare
kinyoklion
left a comment
There was a problem hiding this comment.
Do any of these affected packages import the package.json?
I've seen problems combining esModuleInterop with a commonjs target with loading the package.json.
Did a sweep and it looks like some packages do import |
5010b22 to
04e817d
Compare
This PR will update the way that tests import modules. This is to make the syntax of this module compatible with typescript 6.
Specifically the issue that the current syntax runs into is detailed in https://devblogs.microsoft.com/typescript/announcing-typescript-6-0/#deprecated:---esmoduleinterop-false-and---allowsyntheticdefaultimports-false
Note
Low Risk
Test and TypeScript config-only changes with no production code paths modified.
Overview
Prepares multiple SDK packages for TypeScript 6 by turning on
esModuleInteropin theirtsconfig.jsonfiles (alongside existingallowSyntheticDefaultImports).Test fixtures that used namespace JSON imports (
import * as … from '…json') now use default imports (import … from '…json'), matching the interop model TypeScript 6 expects. Affected areas include edge SDK tests (Akamai, Cloudflare, Fastly, Vercel, Shopify Oxygen), sharedsdk-client/akamai-edgeworker-sdk/sdk-server-edgetests, and a formatting-only update topackages/sdk/fastly/jest.config.json.No runtime or library
srcchanges—only compiler settings and test import style.Reviewed by Cursor Bugbot for commit 04e817d. Bugbot is set up for automated code reviews on this repo. Configure here.